<template>
  <div class="box-header">
    <div class="box-logo-introduce">
      <img class="logo" src="@/assets/images/logo@3x.png" />
      <div class="introduce">
        <div class="name">英语一点通</div>
        <div class="description">你的AI私人助理</div>
      </div>
    </div>
    <div class="btn-download" @click="onDownLoad">下载</div>
  </div>
</template>
<script>
import { download } from "@/utils/openApp.js";
export default {
  name: "HeaderNav",
  data() {
    return {};
  },
  methods: {
    onDownLoad() {
      let url = download();
      if (!url) {
        this.$$message({
          content: "请用默认浏览器打开该链接",
          sure(node, close) {
            resolve({
              node,
              close,
            });
          },
        });
      } else {
        window.location.href = url;
      }
    },
  },
};
</script>
<style lang="less" scoped>
.box-header {
  position: relative;
  width: 100%;
  height: 2.56rem;
  background: #213343;
  box-shadow: 0px 0.133rem 0.64rem 0px rgba(6, 11, 15, 0.16);

  display: flex;
  display: -webkit-flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  padding-left: 0.853rem;
  padding-right: 0.853rem;
  box-sizing: border-box;

  .box-logo-introduce {
    position: relative;
    display: flex;
    display: -webkit-flex;
    flex-direction: row;

    .logo {
      position: relative;
      width: 1.92rem;
      height: 1.92rem;
      vertical-align: top;
      box-sizing: border-box;
      margin-right: 0.533rem;
    }

    .introduce {
      .name {
        position: relative;
        font-size: 0.746rem;
        line-height: 0.746rem;
        font-family: PingFang SC;
        font-weight: 600;
        color: #ffffff;
      }

      .description {
        position: relative;
        font-size: 0.533rem;
        line-height: 0.533rem;
        font-family: PingFang SC;
        font-weight: 600;
        color: #ffffff;
        opacity: 0.5;
        margin-top: 0.373rem;
      }
    }
  }

  .btn-download {
    position: relative;
    width: 3.413rem;
    height: 1.493rem;
    font-size: 0.746rem;
    font-family: PingFang SC;
    font-weight: 600;
    // color: #ffffff;
    color: rgba(24, 40, 54, 1);
    line-height: 1.493rem;
    // background: linear-gradient(0deg, #10a383 0%, #48c282 100%);
    
background: linear-gradient(180deg, #00FFF6 0%, #28C0FF 100%);
    border-radius: 0.746rem;
    text-align: center;
    box-sizing: border-box;
    cursor: pointer;
  }
}
</style>
